#!/bin/sh
#
# @name HolyBro QAV250
#
# @url https://docs.px4.io/master/en/frames_multicopter/holybro_qav250_pixhawk4_mini.html
#
# @type Quadrotor x
# @class Copter
#
# @maintainer Beat Kueng <beat-kueng@gmx.net>
#
# @board px4_fmu-v2 exclude
# @board intel_aerofc-v1 exclude
# @board bitcraze_crazyflie exclude
#

. ${R}etc/init.d/rc.mc_defaults

set MIXER quad_x
set PWM_OUT 1234

if [ $AUTOCNF = yes ]
then
	# The set does not include a battery, but most people will probably use 4S
	param set BAT_N_CELLS 4

	param set IMU_GYRO_CUTOFF 120
	param set IMU_DGYRO_CUTOFF 45

	param set MC_AIRMODE 1
	param set MC_PITCHRATE_D 0.0012
	param set MC_PITCHRATE_I 0.35
	param set MC_PITCHRATE_MAX 1200
	param set MC_PITCHRATE_P 0.082
	param set MC_PITCH_P 8
	param set MC_ROLLRATE_D 0.0012
	param set MC_ROLLRATE_I 0.3
	param set MC_ROLLRATE_MAX 1200
	param set MC_ROLLRATE_P 0.076
	param set MC_ROLL_P 8
	param set MC_YAWRATE_I 0.3
	param set MC_YAWRATE_MAX 600
	param set MC_YAWRATE_P 0.25
	param set MC_YAW_P 4

	param set MPC_MANTHR_MIN 0
	param set MPC_MAN_TILT_MAX 60
	param set MPC_THR_CURVE 1
	param set MPC_THR_HOVER 0.25
	param set MPC_THR_MIN 0.05
	param set MPC_Z_VEL_I_ACC 1.7

	param set PWM_MAX 1950
	param set PWM_MIN 1050

	param set PWM_RATE 0
	param set THR_MDL_FAC 0.3
fi

